package chp02;

import java.util.Scanner;

public class Test5b {

    public static void main(String[] args) {
        //接收器
        Scanner input = new Scanner(System.in);
        // 分别输入3个成绩(语文，数学，英语)，计算它们的平均值
        System.out.println("请输入语文成绩:");
        double chinese = input.nextDouble();
        System.out.println("请输入数学成绩:");
        double math = input.nextDouble();
        System.out.println("请输入英语成绩:");
        double english = input.nextDouble();

        //计算总分
        double total = chinese + math + english;
        //计算平均分
        double avg = total / 3;

        System.out.println("语文\t数学\t英语");
        System.out.println(chinese+"\t\t"+math+"\t\t"+english);
        System.out.println("总分:"+total);
        System.out.println("平均分:"+avg);
    }
}
